//
// Player.cpp for  in /home/lefebv_w//workspace/cpp/bomberman/googleCode/game
// 
// Made by damien lefebvre
// Login   <lefebv_w@epitech.net>
// 
// Started on  Tue May 28 22:43:59 2013 damien lefebvre
// Last update Wed May 29 14:57:42 2013 damien lefebvre
//

#include	"Player.hh"

Player::Player(Vector3f const & position, ALevel & level)
  : AEntity(position, level), m_vector(0.f, 0.f, 0.f)
{}

void		Player::initialize(void)
{
  m_model = gdl::Model::load("../assets/model/marvin.fbx");
  m_basicRotate.x = 90.f;
  m_anim = "Take 001";
  m_radius = 64.f;
}

void		Player::update(gdl::GameClock const & gameClock, gdl::Input & input)
{
  if (input.isKeyDown(gdl::Keys::Q))
    setMove(AEntity::LEFT);
  else if (input.isKeyDown(gdl::Keys::S))
    setMove(AEntity::DOWN);
  else if (input.isKeyDown(gdl::Keys::D))
    setMove(AEntity::RIGHT);
  else if (input.isKeyDown(gdl::Keys::Z))
    setMove(AEntity::UP);
  m_model.update(gameClock);
}
